#medium level LeetCode problems
Explore tagged Tumblr posts
Text
Mastering Medium Level LeetCode Problems: A Comprehensive Guide for Interview Preparation
Introduction Are you preparing for technical interviews and looking to strengthen your problem-solving skills? Look no further than medium level LeetCode problems. These problems strike the perfect balance between complexity and accessibility. They require a deeper understanding of algorithms and data structures while still being manageable within a reasonable time frame. In this guide, we will…
#algorithms#data structures#interview preparation#JavaScript#LeetCode#medium level LeetCode problems#Problem Solving
0 notes
Text
09/11/2023 || Day 107
Personal Chatter (aka I ramble a bit)
Still looking for jobs, and there are still none to be had. Any time I think I haven't applied to a job in a few days, I check and there's literally nothing new. What makes it feel worse is that my current part-time retail job cut hours like crazy, so I'm only coming in once a week instead of the 4 days I'm available. It especially sucks because I do want to spend my day working, but instead I'm at home attempting to program but I'm running out of steam. Not to mention it gets dark so early now; I used to love that as a kid, but as an adult it's just depressing. I think the only thing that's keeping me sane is the fact that I go out to play Magic on Thursdays with people, and I have ASL class on Wednesdays. It's nice to have scheduled weekly events. Hell, I've even been forcing myself to play video games for an hour or 2 every evening to help me get through my games, because even though I like playing video games, it takes a lot of energy for me to start a play session. The joys of being an adult 😂.
But some good news! I have 3 pages left in my sketchbook and I'm so excited to finish it! I've been drawing only in pen in this book for 3 years, so I'm so ready to start a new one and be able to use pencil and actually take my time with drawing instead of just pumping out sketches. People say that sketching in pen will improve your art faster and enables you to draw faster, but I realized I really like getting sucked into a sketch and take my time with it, which I can't really do with pen.
📺 : The Haunting of Bly Manor (rewatch)
🎮 : Mass Effect Andromeda
📚 : Fight, Magic, Items - The History of Final Fantasy, Dragon Quest, and the Rise of Japanese RPGs in the West.
------------------------------------------------------------------------------
Programming
LeetCode
I've been doing 1 problem per weekday for a week now! Yesterday and today I did some medium-level questions on Strings/Arrays which took about 2 hours each. Yesterday I had to look at other peoples' answers, but today I managed to solve it by myself. Am I in the top percentile for time and space complexity? Absolutely not, but I solved it, so I still consider that a win.
Hobby Tracker - Log # 4
I feel like I'm bored out of my mind. I know I said I was gonna focus on doing a full-stack project this month, but I still haven't done the desktop design for the project and I can't bring myself to continue designing. The good news is that I "finished" the mobile design, so I can instead pivot and just create a mobile app instead if I so choose, and I just might...or just do mobile-view first and get all the functionality done, then move onto desktop.
11 notes
·
View notes
Text
TikTok OA: Insider Strategies to Ace Your Coding Challenge
If you’re preparing for the TikTok OA (Online Assessment) in 2025, you’re not alone. The competition is fierce, the questions are tricky, and time is tight. Whether you’re a student or a seasoned coder, understanding what to expect and how to prepare can make all the difference.
In this guide, we’ll explore what the TikTok OA entails, share proven preparation tips, and offer a resource that has helped many candidates succeed.
What is the TikTok OA?
The TikTok OA, short for Online Assessment, is a timed technical test usually sent out after your resume passes the initial screening. It often includes a combination of algorithmic coding challenges, debugging problems, and multiple-choice questions covering data structures, time complexity, and more.
Most candidates get 60–90 minutes to solve 2–3 coding questions, typically on platforms like Codility or HackerRank.
Common TikTok OA Questions and Strategies
TikTok's online assessments are known for mixing standard topics with some tricky twists. Here are a few commonly tested areas:
String manipulation & pattern matching
Dynamic programming
Greedy algorithms
Graph & tree traversal
💡 Tip: Practice solving LeetCode medium-level problems under timed conditions. Focus on optimizing your code for edge cases and large input sizes.
TikTok OA Code Cheating and Tips
While we don’t endorse any dishonest behavior, it's important to be aware of what’s happening in the community. Our detailed post on TikTok OA code cheating discusses how some candidates attempt to manipulate the system — and why it’s better to focus on genuine preparation strategies instead.
This article is a must-read for understanding TikTok’s assessment integrity mechanisms and what to avoid during your test.
Final Thoughts: How to Stand Out in the TikTok OA
Success in the TikTok OA depends on preparation, focus, and honesty. Study past patterns, work on your problem-solving speed, and approach the challenge with confidence.
1 note
·
View note
Video
youtube
LEETCODE 2 : Add Two Numbers : java solution
LeetCode problem 2, titled "Add Two Numbers," is a medium-level challenge where you're given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. The task is to add the two numbers and return the sum as a linked list. This problem tests your ability to manipulate linked lists and handle carry-over while adding digits. It provides a good exercise in simulating a numerical operation typically handled automatically by hardware, applying core computer science concepts in data structure manipulation and algorithm design.
0 notes
Text
7 Epic Platforms to Level Up Your SQL Game!!!!
If you're looking to level up your SQL skills, you're in the right place. SQL is a fundamental language for data professionals, and mastering it can open up opportunities in data science, data analysis, and other data-related roles.
But how do you go from learning SQL to becoming proficient in it?
The answer is simple: practice, practice, practice.
In this article, we'll explore the 7 best platforms to practice SQL and sharpen your data skills.
1. HackerRank: Coding Challenges for SQL Enthusiasts
HackerRank is a leading platform for coding challenges, and it offers a comprehensive SQL practice suite. Whether you're a beginner or an experienced SQL user, HackerRank has a wide range of questions to suit your skill level. You can filter the questions by difficulty (easy, medium, or hard) or by topic (select queries, joins, aggregations, etc.). Additionally, HackerRank offers Skills Certification Tests that allow you to test your SQL skills in a timed assessment format. With a free account, you can access the entire collection of practice questions and assessments.
2. SQLPad: Practice SQL with Real-World Scenarios
SQLPad is another excellent platform for practicing SQL. It provides practice questions in three broad areas: single-table operations, multi-table operations, and window functions. Each category includes questions of varying difficulty levels, allowing you to gradually progress from basic concepts to more advanced topics. SQLPad also offers industry-specific SQL coding questions, which can help you prepare for real-world scenarios. While some features require a paid account, you can access a selection of questions with a free account.
3. StrataScratch: Learn SQL with Real Company Interview Questions
StrataScratch is a popular platform that offers a vast collection of SQL interview questions. What sets StrataScratch apart is its focus on real company interview questions. You can filter the questions by topics, difficulty levels, and even specific companies. This platform provides a coding workspace that supports PostgreSQL, MySQL, and Microsoft SQL Server. If you're comfortable with Python, you can use the pandas library to solve the questions. With a free account, you can access a substantial number of questions and solutions.
4. DataLemur: Master SQL with Curated Interview Questions
DataLemur is a platform that specializes in curated SQL interview questions. Its collection includes questions that have appeared in interviews at top tech companies like LinkedIn, Tesla, Microsoft, and Walmart. With over 40 interview questions, DataLemur covers various SQL topics, including conditional aggregation, string and window functions, and cumulative sums. This platform can help you familiarize yourself with the types of questions commonly asked in SQL interviews.
5. LeetCode: Sharpen Your SQL Skills with Coding Challenges
LeetCode, a popular platform for coding challenges, also offers a diverse collection of SQL questions. You can find SQL problems of different difficulty levels and topics on LeetCode. The platform allows you to filter the questions by company tags, so you can practice questions asked by specific companies like Google, Amazon, Facebook, and more. While some features require a premium account, you can access a subset of the questions with a free account.
6. Mode: Learn and Practice SQL in a Structured Curriculum
Mode is a comprehensive platform that offers a structured curriculum for learning and practicing SQL. Its SQL tutorial covers three levels: basic, intermediate, and advanced. Each level includes multiple lessons with practice questions. Mode's curriculum covers a wide range of SQL topics, including select statements, joins, aggregate functions, subqueries, and window functions. This platform is an excellent choice if you prefer a guided learning experience with a well-organized curriculum.
7. SQLZoo: Learn SQL with Interactive Lessons and Assessments
SQLZoo is a learning and practice platform for SQL that offers interactive lessons and assessments. Its bite-sized lessons cover various SQL topics, starting from basic select statements to more advanced concepts like window functions. Each lesson includes short practice exercises to reinforce your learning. SQLZoo also provides dedicated assessments with more involved SQL questions to test your skills. This platform is ideal for hands-on learners who prefer interactive learning experiences.
Get Started with Tutort Academy Data Science Courses With Tutort Academy's data science courses, you can learn SQL and other essential data skills from industry experts and gain the confidence to excel in your data career.
Conclusion
Practicing SQL is crucial for improving your data skills and acing SQL interviews. The 7 platforms mentioned in this article offer a variety of practice questions and coding challenges to help you sharpen your SQL skills. From HackerRank's coding challenges to SQLPad's real-world scenarios and Tutort Academy's comprehensive data science courses, you have plenty of options to choose from. So, start practicing SQL today and take your data skills to the next level!
0 notes
Text
CodePerfectPlus HackeRank Solutions
10 Days of JavaScript Day 3: Arrays, Try Catch and Finally & Throw
Day 3 of 10 Days of JavaScript challenge on Hackerrank is Arrays Try Catch and Finally amp Throw
In this series I will be sharing my solutions t
Diagonal Difference - Problem Solving | HackerRank
Diagonal Difference is easy level Python problem that requires basic knowledge of Array In this post we will provide a Python solution for Diagonal Differe
Compare the Triplets - Problem Solving | HackerRank
Compare the Triplets is an easy level Python problem that requires basic knowledge of Python In this post we will provide a Python solution for Compare the
A Very Big Sum - Problem Solving | HackerRank
A Very Big Sum is an easy level Python problem that requires basic knowledge of Python In this post we will provide a Python solution for A Very Big Sum
Simple Array Sum - Problem Solving | HackerRank
Simple Array Sum is easy level Python problem that requires basic knowledge of Array In this post we will provide a Python solution for Simple Array Sum
Solve Me First - Problem Solving | HackerRank
Solve me first is easy level Python problem that requires basic knowledge of Python In this post we will provide a Python solution for Solve me first
Default Arguments - HackerRank Solution Python
Default arguments are a feature of many programming languages that allow you to specify a value for an argument that is not explicitly provided by the caller
Compress the String! - HackerRank Solution Python
Compress the String is a medium level Python problem that requires string manipulation In this post we will provide a Python solution for Compress the Str
Reverse Integer Algorithm in C++, Java, and Python - LeetCode Problem
Reverse Integer is the medium-level problem of LeetCode In this post we will see the solution to this problem in C Java and Python
The Minion Game - HackerRank Solution Python
The Minion Game is a Python programming challenge that requires the manipulation of a given string to generate different subsets of words which can be score
1 note
·
View note
Note
hi there, i'm trying to get into the coding community so to speak. what sites can i join to discuss/do coding related stuff? I know about stack overflow, github and leetcode but i'm sure there are more, do you have any advice on which spaces are worth joining? thanks!
Communities To Join For Coding/Programming
Yeah I can help! In terms of "which spaces are worth joining" would depend on you. What I see as a place worth joining is a place where I can teach others - I like giving knowledge back on what I learnt so some places that I listed don't work well for me to do that and some others I prefer the most like the discord servers I'll mention. So, you'll have to skim through these and see if they're something you like!
Anyhoo, here are some places I found:
Reddit: There are many subreddits dedicated to coding, such as r/learnprogramming, r/coding, and r/programming. You can also find subreddits dedicated to specific programming languages or technologies so you can get specific help or provide the help to those languages etc.
Codecademy Forum: They have a forum and a discord server where you can talk about the courses and get buddies to do projects together who are at the same level as you!
FreeCodeCamp Forum: This website offers free coding lessons and projects, and also has a community forum where you can ask for help and connect with other learners. I met 2 developers from there who helped me a lot.
Dev.to and Medium: Both a community where developers come to share their knowledge and experiences through blog posts and discussions. Developers sometimes gain good writing experience by writing these posts (great way to move towards being a technical writer). I've made a Dev.to account and I'm slowly adding my programming posts from here to there and I want to start using Medium too 🤔
Discord: There are many Discord servers dedicated to coding, where you can join discussions and get help with coding problems. I made a whole post with a list of discord servers I'm part of and would recommend it if you want to get into it! I made lots of developer friends from the discord servers. Intimidating at first but slowing you'll like it I think! I'm mostly there to help people with HTML and CSS problems and you can help people the same with whatever. you're strong in!
In the end, the websites and communities you choose to join will depend on your interests and goals. I recommend exploring a few different options and finding the ones that work best for you - I did that and I preferred the discord servers over the subreddits 😅
Good luck with your coding journey! 😸👍🏾💗
#my asks#coding#programming#studying#codeblr#progblr#studyblr#reddit#Codecademy#freecodecamp#dev.to#comp sci#computer science#discord#discord servers#programmer
194 notes
·
View notes
Text
A LLM got 12th in a Leetcode coding contest (probably)
In Weekly Contest 344, a fresh account (gogogoval) solved all 4 problems in 12:13 with commented submissions and test cases that look a lot like LLM code.
This could've been faked, but I doubt it. There are a small group of people in the world (a thousand, maybe) who could solve this contest fast enough to get 12th and add comments (or solve the problems and then feed it to a LLM to add comments), but it would be a very odd thing to do on a fresh account. The code itself also looks like LLM code - it uses techniques like gets on dictionaries (instead of using defaultdicts like most competitive python programmers).
This isn't that impressive. Leetcode contests are pretty easy, and this was an unusually easy contest - all four of the problems are rated easy or medium. Leetcode contests at the top level are about speed, not depth of understanding, so it's not that shocking that a LLM could do very well.
It's still a pretty massive leap. The free version of ChatGPT can solve two of these questions with some prodding, but it's pretty helpless on the other two. In particular, the last problem (the paths through a binary tree) is not trivial - it took me about ten minutes to find and implement a solution last night, and I'm pretty good.
This isn't that big of a deal for competitive coding, but it is a big deal for both Leetcode and the online assessments companies give. I don't know how much prompting or bugfixing it took the human who submitted this code to get the LLM to a correct solution, but either way, it changes the game on how we think about easy problems. We've gone from models that were very dull to a model that could probably pass the first round of a FAANG interview for a new grad. Already, in the week after, a skilled coder used a LLM to solve the first two questions of the Leetcode contest while solving 3 and 4 manually, saving a bunch of time and getting rank 5 in the contest. Easy questions aren't useful discriminators anymore.
This is the first thing I've seen a LLM do that genuinely impressed me. We are steadily approaching a point where either the improvement will slow or these things will have massive economic impact, and I have no idea which will happen.
122 notes
·
View notes
Text
Codeforces thoughts
In addition to my leetcode contests and practice, I'm starting to practice on codeforces (and will hopefully compete there once I feel like I have the hang of the format).
It's a real shift! It's clear that the implicit audience is no longer undergrads or high schoolers looking to get a leg up on coding interviews, but rather people with professional coding jobs who are doing this as a rather intensive hobby.
Some major differences:
No more time-out modifiers: The amount of time your code has to run isn't language-dependent, which means that Python or even Java solutions can time out even if they're asymptotically correct. Most people use C++ as a result, but for me, that means I'll be using Rust.
Editing locally is incentivized: Leetcode basically forces you to edit using their pre-built browser editor - there's no option to submit your own code, it generates your function wrapper for you and gives you your expected inputs, and it lets you test in-browser.
Conversely, codeforces has a browser editor, but it doesn't give you anything, and you can submit files, so you're much better off editing locally. I'm also using a Firefox extension combined with a command line tool to set up my workspace for me and scrape the given tests off the web. This makes editing locally remarkably convenient.
IO is also different - leetcode just hands you your inputs as variables you can work with, and expects you to return your outputs. Codeforces writes your inputs to stdin and expects you to write your outputs to stdout. This would be really annoying in Rust, except I'm borrowing code which handles all of the messy bits for me.
Shit's harder: Leetcode only has three levels of problem, Easy, Medium, and Hard. Easy problems tend to be extremely trivial, medium problems range from a couple minutes of thought and coding to around half an hour, and Hard problems get quite difficult.
Codeforces problems are assigned a rating, starting at 800. The equivalent to Leetcode Hard problems start showing up around rating 1500. The highest rated problems on the site are well over 3000-rated.
On leetcode, contest winners finish the 90-minute contest in under 20 minutes. On codeforces, you'll see contests where almost no one solves all of the problems. As a consequence of this and editing locally:
You're expected to use an algorithms cookbook: You can't just go in blind and rewrite Djikstra's every time you encounter a graph problem, recreate Segtrees every time they end up being useful, or get away with using built in utilities like @lru_cache in Python every time you want to use dynamic programming. Reusing useful code is essential.
This would create a big problem with having to copy-paste code, except I can just import stuff and the command line tool will just automatically copy the code for all of my dependencies into the submission file, which rules.
All and all: very excited to be working with harder problems on a site that's more competitively focused. If anyone else finds this appealing (@birth-muffins-death, @wuggen) let me know and I can send you/walk you through all the stuff I picked up that makes your work environment nice.
11 notes
·
View notes
Text
i accepted a job offer!
it’s been like four years coming, but now announcing the next adventure i will embarking on after college: i’m really excited to share that I accepted a full-time software engineering position at Stripe! (a mid-sized company focused on payment platforms, responsible for a large portion of e-commerce, chances are that if you’ve ever bought something on the internet, your money’s probably gone through Stripe) If you thought that this blog would die after I graduated, you were wrong haha you cannot get rid of my shit content
How it happened
The past few months have been a lot of interviewing (read: a lot), a lot of leetcoding, and a lot of managing timelines and emails. I actually haven’t slept through the night since like September because of my anxiety levels (which is really bad!!!!) so I’m really glad that this whole thing is over. My application season started in mid- to late- August: I had a goal of applying to one company every day, and I kept that up for a couple weeks. Going in, I kind of had a plan of what kind of companies I wanted to apply to - I was planning on taking my return offer originally, but I wanted a few more potential offers to have negotiation leverage when the time came, and I also wanted to see what was out there too. A couple places also reached out to me, so I followed up with them. All in all, I ended up pursuing 10 companies across big tech, a couple unicorns, and some finance firms.
Interview Hell
I have this grand idea of writing a really in-depth guide to how to do interviews + how to find internships + how to handle the system because there are a lot of weird tips and tricks that make it a thousand times easier to get a job, but only if you’re in the know (which is really dumb, as the industry is still pretty gate-keepy). But until then, I’ll just talk about what the interview process was like after this. So I heard back from a lot of those companies asking for what we call “online assessments”, which are basically timed coding tests where you have to code a solution to problem(s) in some x number of minutes or hours. These questions range from coding merge sort to coding a recursive dynamic programming solution to some optimization problem. A lot of companies send these out to everyone and then resume screen, and some might resume screen and then send these out. I admittedly didn’t prepare too much for these, I got pretty lucky and knew how to do most of the problems based off of the years of practice I’d had already (turns out coding every day for like 3 years is actually really good practice already).
A couple companies skipped ahead to the first round phone interview stage. After the online assessments, I got a wave of several first round interview requests, which are usually over the phone for an hour. One of them was a Karat interview, which is some third party, unbiased interview company, and all I remember from this was trying gauge how I did from the body language of my interviewer’s tiny Zoom screen, and I could tell absolutely nothing. It was nerve-wracking. One phone interview lasted for 20 minutes out of the hour it was supposed to take, and I thought I had failed on the spot. I did actually leetcode in preparation for these problems, and most of them ended up being easy - medium questions, usually simple applications with tricky twists, like implementing certain data structures from scratch with O(1) runtime methods. Most of these were early-mid September, squeezed into hour-long breaks in my day.
Final Round Hell
After all these, I ended up moving forward in all of those interviews to the final round, which are usually series of 3-4 video interviews, back to back, usually technical in nature. I thought the one hour phone screens were rough, but this was a real test of stamina. This is also where timing got really tricky for me, because I was trying to time my interviews such that any offers I got would align together in as much of an overlapping window as possible, so that I could negotiate offers a lot easier and see all my options at once.
Preparation for this was also hell - it was a lot of Leetcoding, a lot of interview research online, a lot of going over my stories. I vary between three main stories for all the possible behavioral questions people could ask me: the nonprofit project Amplify that my friends and I worked on, my intro CS class final project, and my previous internship project. In the end though, it was a Lot of leetcoding, I learned so much about graphs and searches and backtracking and DP, I cannot even tell you. I haven’t thought about topological sort since 2017. And somehow, some way, it actually came up in one of my interviews, and WOW i knocked that one out of the park.
My Stripe final round was actually one of the first ones I had way back in mid-September. It was four interviews back to back, three technical, and one more behavioral. I remember feeling generally confident, but not 100% afterwards, mostly just exhausted. Most of my on-sites were in early-mid October - I think I had six days of final interviews over 2 weeks, so I was literally about to pass out at all times. I was really looking forward to travelling this semester too for final rounds (I would’ve gone to New York, Chicago, SF/Bay, Detroit ..... sad). I also had several calls with career centers, people from different companies, recruiters, other info sessions, etc. I started out wearing nice clothes, but in the end, it was over for me - I was in sweats and a tshirt. In this two week period, I was lucky enough to grab a few offers - my return offer, but also a few offers from other companies, including Stripe, whom, at this point, I had given up all hope on, since they told me in late September that they wouldn’t know whether they’d have a spot for me. I remember getting the call back while picnicking with my friends, absolutely shocked I was in the position that I was.
Decision Sweat
At the end of the day, from the places I interviewed with, I ended up getting official offers from 5 places (1 of them being my return offer), 1 tentative offer (I think they ghosted me though because my deadline was too soon), 1 ghost (again, my deadline was too soon so I think they gave up on me), and 1 reject (that one was a really rough interview).
Let me be clear - I hate decision making. I am really bad with any sort of decisions. This process was worse than my college application decision. I’ll make a separate post in about a month or so detailing why I made the decision I made to go to Stripe instead of back to Google, but broadly it was because I wanted to try something new and take risks. It was a really hard decision because my last internship was really awesome and I loved the team I worked on, but ultimately the lack of a guarantee of returning to that team and the allure of working at a new place was too much to overcome. I talked about this every day with my friends and family and mentors, I made a whole decision matrix, but at the end of the day, I did end up flipping a coin on Facetime. Stripe was tails, and the coin flipped tails, and then I screamed and went to sleep. so that was that
I really have to thank the people in my life for bearing with me during this period - I think I must’ve been really obnoxious with how much I was talking about it, but I’m glad that they were there to hear me out every time I flipped my decision. And more generally, my friends and family were the reason I got through MIT, and did all the cool things that I talked about in my interviews and pushed me to learn and strive for the best. And most importantly, they’re the ones who celebrate my interests and accomplishments and push me to try new things. [this whole blog post is one sappy rant about how much i love my friends and how they got me to where i am ok end rant end post]
2 notes
·
View notes
Text
17/11/2023 || Day 110
LeetCode
Did a medium-level question both yesterday and today. I'm doing questions involving a sliding window, and today I managed to solve a question that involves a dynamic sliding window by myself without looking anything up. Mind you, my result's speed only beats 5% of other Java users, but hey, I got it done. I know I'm absolutely gonna jinx myself by saying this, but I think I've gotten a lot better at solving array/string problems compared to when I first started doing LeetCode back in June. Yesterday's problem took me basically no time, and today was probably a little over 30 mins...? Certainly better than 2 hours, though I still run into problems that take me that long to complete.
Frontend Mentor REST Countries - Log #1
Decided that even though I'm burnt out, I still need to do some programming, and doing another Frontend Mentor takes away the boredom of coming up with designs. I worked on it for 1.5 hours today and I got the dark mode toggle to work, and got started on some of the CSS. That's honestly the most I've programmed for a project in a week.
7 notes
·
View notes
Video
youtube
Welcome back to VanAmsen's coding challenges! Today's episode dives into the LeetCode Daily Challenge #2090, "K-Radius Subarray Averages", and we'll be solving it using JavaScript. This medium-level problem tests your grasp of arrays and the sliding window technique.
The challenge gives us an array of integers and an integer k. The task is to calculate the k-radius average for each subarray in the original array. This requires an understanding of integer division and efficient handling of edge cases, presenting an engaging and fun coding challenge.
In this video, I walk you through the JavaScript solution, explaining the logic behind the algorithm, its implementation, and how we handle edge cases. Whether you're preparing for coding interviews or looking to improve your problem-solving skills, this video will surely help you elevate your JavaScript coding prowess!
Please remember to like this video, subscribe to the channel, and hit the notification bell so you won't miss our daily coding challenges. Let's jump into Challenge #2090 with JavaScript!
Tags: LeetCode, Daily Challenge, Coding Interview, Programming, JavaScript, Algorithms, Problem Solving, K-Radius Subarray Averages, Coding Challenge, Sliding Window, Integer Division, Array Manipulation, Data Structures, Coding Skills, Code Walkthrough, VanAmsen, Subarrays, Averages, Medium Difficulty, JavaScript Coding
0 notes
Text
Leetcode Problem#958. Check Completeness of a Binary Tree
Leetcode Problem#958. Check Completeness of a Binary Tree
Given a binary tree, determine if it is a complete binary tree.
Definition of a complete binary tree from Wikipedia: In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h.
Example 1:
Input: [1,2,3,4,5,6] Output: true Explanation:
View On WordPress
0 notes
Text
Interviewing for a Technical Position Doesn’t Have to Be Scary
Jacob Schatz (@jakecodes) is a staff engineer over at GitLab and was kind enough to share how he conducts job interviews for technical positions and his thinking process for them. Technical interviews are talked about often and can be a touchy subject for some, so it’s worth noting that this article expresses Jacob’s own opinions and are not necessarily shared by his employer.
Are you an interviewee who is terrified, exhausted, sad, or disappointed? I'd love to change that stigma.
I believe that people can have a great interview experience, and that I can simultaneously find the right candidate. Both things can happen at the same time! After your interview process is over, in a perfect world, regardless of outcome, you should feel good about yourself and the process. You might feel sad that you didn't get the job or excited to start your new job, but you should understand why in either situation.
At GitLab, I was put in charge of hiring very early on, and as such, I've seen thousands of resumes. When I first joined, I was asked to hire and form a team of front-end developers. I was employee #29 (we now have 500+), and I was the first front-end developer, so there was no hiring process for our team. We gradually created a process.
This article is aimed at both the interviewee, and interviewer. For the interviewee, I want you to know what a perfect interview can be like. Interviewing should not be scary or intimidating. This is a guide you can follow to do your part in creating the perfect interview. If you are an interviewer, maybe you have perfected your process. This is my view on how interviews can go in a perfect world. There are all different types of interviews, and this article focuses on interviewing developers of all experience levels. Over the years, I’ve latched on to some great processes, and this article is a behind-the-scenes look at that process for both sides of the candidacy.
Before I begin, it's important to remember that everyone is human and humans are not perfect. There are no perfect developers. Treat everyone like a regular human being. It's OK to be amazed at what some people are doing, but not OK to worship others. Talent is both congenital and acquired and you can acquire it too. Your interviewer and you are both imperfect. Interviews should not be focused around perfection. Here's what interviews should be.
Five things I look for in a candidate
The GitLab Values cover a lot of great points and you should read it. This is loosely based on those.
As an interviewer, I can only focus on so many things at once while being a productive, active listener. But I do have five specific things I am try to focus on:
Does this person have a "good head on their shoulders"?
Is this person technically where they need to be for this role?
Is this person going to be self sufficient in this role?
Does this person communicate well and will they communicate well with the team?
Does this person handle positive and negative feedback well?
There are other things I'm looking for, of course, but these five things are enough to get you the job you want if you’re interviewing with me.
Forget nervousness. I won't ever hold it against you. I know you may be nervous, and that's totally fine. There is the rare occasion that nervousness becomes a debilitating factor, and in those cases, I just ask that you reschedule. Just don't hang up on me!
Recognize there's going to be bias
We have training on bias at GitLab. One thing I learned from the training is that everyone is biased, whether or not you think you are. At one point, I had the idea of doing blind interviews like they do for some orchestras. We never implemented it (and it would be tough) but that's why I keep a list of questions and a summary of what I want to cover in each interview. Each interview has a script I can follow. Everything is as repeatable and similar as possible. As the interview progresses, I'll be able to tell if I can hit the harder questions. Harder questions are not there to disqualify people, but to qualify people. If you get to my hard questions it means you have a ton of experience and knowledge under your belt. It's really important to know that I must ask trivia questions in some form but I don't qualify candidates based on trivia questions. It's about figuring the depth of your JavaScript knowledge and programming in general.
That being said, there is still one trivia question no one has ever gotten right. I'll just keep asking it, and I am sure some day, someone will get it. Trivia questions are fun, because I am a major JavaScript dork. I just love talking about all the ins and outs of JavaScript. I am looking for people that can be my coding buddy. Hiring people is about finding other people you can work with, not people that will work for you.
Inexperienced interviewers tend to test you on what THEY know (so they can feel a little more secure when they can ding you on an "wrong" answer).
In contrast, great interviewers focus on what YOU know, and facilitating a two-way conversation to explore a mutual fit.
— Jennifer Kim (@jenistyping) April 8, 2019
I want to know you're technically sound
This may be people's worst fear. The part of the interview where we ask questions like, "Why are manholes round?" The truth is that some companies may ask the medium-to-hard questions from LeetCode, and some may never ask any technical questions.
What I'm looking for in your skillset
Experience speaks louder than any technical interview question I can ask. For example, if I'm hiring for a front-end engineering role and someone tells me they built their own cool things that we can talk about, then that's awesome. I still may need to throw some more questions their way after that, or maybe the demo answers all my questions (though unlikely, but possible). But if we can walk through the code of something that you are super proud of, that’s great.
It’s helpful if you can tell me about something that you built for another company where I can see your code, or you can explain it sufficiently enough. What were the challenges? How did you deal with 10,000 comments? How did you deal with mobile? What were some challenges? I'll give you an example: You built the comment system for GitLab. For the comment system, an interesting challenge was dealing with loading users for the @ drop-down to mentioning other users. It turns out that the JSON payload for that drop-down can get quite large and loading it on page load makes the page load significantly slower. But loading that data on the first @ keypress is also slow because the payload can be more than 10 MB. We want the user to have a seamless experience and not realize the data needs time to load. So, a good way to talk about that experience would be to describe some of the approaches you considered, like:
Load the data when the comment box first appears in the viewport.
Load the data on the user's first mouseover of the textarea.
Load the data once the user starts scrolling with enough momentum.
That last one isn't a boring solution, but is something I've heard someone say in an interview.
I might ask about algorithms and data structures
Hey interviewers, are you hiring someone for your marketing site? Don't ask them the hardest algorithms and data structure questions. Yes, algorithms and data structures play a huge part in everything, but it's more important that the candidate knows about responsive design, and maybe animations, and performance. Since we are talking about performance, they should know about Big O notation. They should know what causes re-paints. Look at Firefox Monitor and compare it to Salesforce. Everything about the Firefox site is much more snappy. Why is it more snappy? Why is the Salesforce site so chunky and slow? Resize them... oy vey! Big O would probably help you explain some parts, but being able to explain the whole picture is important.
Quick aside on Big O notation since I brought it up.
Big O is a way of describing the time your code will run in and/or the memory space your code will take up in a worst case scenario. I think it's really great to learn, and helps out in every day programming. You can and should learn it, which might take about an hour. After one hour, done or not, you’ll more than likely be prepared for any legitimate Big O question that interviewers would ask.
Big O is not something you need to take a course on. Here are some articles that can explain it to you in under an hour:
I like this Interview Cake article.
For a more formal but eventually understandable article, check out Brillant.
For a cheatsheet once you feel comfortable, check out the big o cheat sheet.
For some great examples (in a different language but very grok-able), check out this Developer Inside article.
OK, back to algorithms and data structures in interviews.
Since there's a chance these types of questions will come up, it's worth doing a little homework in advance. There are two typical gold standards when studying for interviews that ask about algorithms and data structures.
There is a book called Cracking The Coding Interview by Gayle Laakmann McDowell.
There is a website called LeetCode with lots of resources.
There are many other things that are recommended for algorithm and data structure, heavy coding interviews, but rather than memorizing every example in the world (which won't solve any problems for you), it's better to learn how to solve these problems.
As I said above, front-end engineers should learn Big O for their health, because it's good for you, like eating your Wheaties. Interviewers should not ask extensive algorithms and data structure questions unless the job requires extensive knowledge of them. If I was designing a front-end framework, say like Vue, it would be important to optimize a DOM diffing algorithm or at least understand the implementation of the algorithm you are using. But does that mean I would ask seven extra hard questions from a CTCI? No. You are testing for understanding, not for memorization. When people work through these questions (when I ask them), I want to see that they thought through the problem and we worked it out together more than I want to see that they got the right answer. It's all about figuring out what you will be able to do, as an engineer, when you get the job — not what you memorized yesterday. A person who has knowledge of algorithms is going to be better at implementing them than someone who has to learn them on the job.
Are you hiring someone to build a dependency management system? This person needs to know a lot about algorithms and data structures.
These are two extreme ends of the spectrum, but in my opinion, not everyone needs to know how to write a red-black tree from scratch — but everyone should understand Big O. However, it will dramatically improve your skills as a software developer to learn typical algorithms and data structures.
When I do ask algorithm and data structure questions here are a few I do ask:
What is a linked list and can you show me how to implement one with and without an array in JavaScript?
What is the difference between BFS and DFS and can you implement one of them?
Getting these wrong will not disqualify anyone. Remember, I don't use trivia to qualify people.
Do you have a good head on your shoulders?
There are a lot of soft skills I'm looking for as well during the interview. It's my way of determining whether you have a "good head on your shoulders."
Pedantically speaking, that means you make good decisions, but it's much more than that to me. People who have a good head on their shoulders make sound decisions. It's good to have different opinions than me, but there is a standard of knowledge we should agree on. For example, we should all agree that laying out an entire blog with only absolute positioning is a bad idea. That is not a sound decision.
But I might create a scenario like this to check on those skills:
Let's go into CodePen and create a static blog homepage. We'll need a navigation menu, and we'll need a place for the title and article, and then at the bottom let's have some comments and a footer.
I'd then talk you through different ways you could create the navigation and the pros and cons to each. For a lot of the front-end developers I hire, I'd like to know that they know some core JavaScript so I might ask them add some small functionality using only vanilla JavaScript.
When a framework does everything for you, you don't need to do things yourself. I want to know that you get the whole picture.
A “good head on you shoulders" is a fancy way of telling me that you have your crap together. This is not an exhaustive list, but are the types of things that catch my attention:
You take care of yourself
You speak professionally (this has more of an impact than most people know)
Leave out super personal details
Answer questions succinctly
Take time to think
Say, "I don't know," when you don't know
Be confident, but not cocky, even if you aren't
You finish what you start
You are honest
You are able to say no
You know what you want and you want to help others get what they want
You'll disagree and even debate, but know when to let something go
You are able to effectively communicate in an interview
Is this conversation easy or exhausting?
Are you fluent in English? Accents are totally OK!
Do you grasp the concepts being discussed?
You’re a kind person.
On that last point: kindness doesn't mean you are a pushover. Kindness is a major part of challenging others and giving feedback.
I want to see that you are self-sufficient
It seems obvious now, but I am convinced — after working at GitLab — that self-sufficiency is what interviewers should seek in everyone being hired. Self-sufficiency plays a big part in your role in the company.
For example, to go extreme, think about a GM, who may have the least amount of external direction of anyone on a team. Everyone has responsibilities, but a GM must often be good at many things, including (but not limited to) marketing, sales, and management. All this changes based on the size of the team. Their role may be the most vague. They are very self-sufficient. A senior developer (in my opinion) should be able to take on an entire large piece of functionality and implement it properly.
This is not to say a developer shouldn't communicate during the process. They should ask questions, and pair with other people to find the best way forward.
Reviewing an interviewee’s code has the opportunity to be boring (in a good way) as we know what to expect from them. We are relying on them to mentor less experienced developers. Junior developers should be self sufficient too, but probably won't take on large initiatives alone. Junior developers often work great in small chunks. For example, it might be a great thing for a junior developer to take on the smaller tasks that a senior developer has on a larger project. Senior developers can also mentor junior developers and nudge them in the right direction to help them become more self-sufficient, which is a great thing for both parties — and also a great thing for the manager, as they can delegate more work to a senior developer.
If you are a front-end developer and need hand-holding at this point in your career, that is totally 100% OK, and everyone has been there. Or, if you are applying to a lot of places and not getting anywhere, and are extremely frustrated: I suggest that you become a little more self-sufficient before you apply. One way I suggest to become more self-sufficient and nab that job you want: Forget code examples, little shopping cart apps, and their ilk, as they don't fair well for job interviews. Build something full-fledged for someone and do it for cheap or free. Find a church, synagogue, homeless shelter or someone near you and offer to make them a website.
Just remember that free clients are often the worst clients. It will be worth it when you can say that you've done work for a few clients. For bonus points, document your work in a few blog posts. This stuff looks great on resumes and will make you stick out from the rest. I know that anyone can get an easy website through Wix or other site building platforms, but there's nothing like a wonderful custom-designed website. I think I made around 10 or so websites before I had my first programming job. I could fill a book with crazy stories from those times.
Communication and feedback is key
This is another point that seems obvious, but is hard to do right. Communication is well documented in the GitLab Handbook so I won't cover it, except to say that I follow GitLab's values and we are looking for others who desire to follow those values as well. Positive and negative feedback is also well documented in the GitLab Handbooks, so I won't cover it here.
How I go about the rest of the interview
Because we interview a lot of candidates at GitLab, we follow a common flow so we can repeat it easily. I won't go into specifics about our interview process, because it's constantly evolving. But, in general, this is the flow I follow.
Tell me about yourself
You'll get asked the famous question that goes along the lines of "tell me about yourself," "tell me what you've been doing," or "tell me about your time at [Company Name]." When I ask this question, I am trying to find the connection between the job you applied for and the jobs you've had in the past. It's good to find the common ground ahead of time.
Like, for example, as an employee of GitLab, if I were personally applying to a FAANG as a front-end engineer, I am sure both GitLab and that company are trying to get page load times to be faster. Maybe I noticed there were 26K event listeners on a page when I first joined GitLab and was able to reduce it down to 0, decrease the loading time by 50%, down to a speed of 200ms. I am sure this would be something relevant to the conversation.
So, as an interviewee, I might say something like this:
"Hi! I am a front-end engineer at GitLab, I've been here for 3.5 years and during my tenure I've made a ton of huge improvements, some of the areas I loved working on are performance, UX design implementation, and architectural design.
You don't want to get into tons of details at this point, but it's good to give the interviewer some facts to work with. It is frustrating when I ask this question and someone goes into a 10-minute detailed account of their entire career.
What made you apply to our company?
The interviewer might ask, "What made you decide to apply to our company?" Hopefully, you are excited to work at this company — otherwise, why bother applying for it?
For some reason or another, this question often sends a candidate into overdrive and they wind up mixing up the name our company. That's perfectly normal behavior, especially if your company sounds like another company.
What I'm looking for at this point is to see whether you are just looking for a job or that you’re really excited to work with us. We want people who really want to work with us. This is when I can also see if a person knows anything about our company. For example, some people like our values, have read them and want to work at a company with these values. Some people want to solve big problems like the ones we are tackling. Some people have seen talks and read articles from our team and would love to work around smart people like them.
What are your five things?
Lastly, I like to ask if a candidate has any questions for me. This is an important part of the interview, and you should extensively think this through beforehand. Your goal is to make me respond with: “Oooohhh, great question!" On one hand, I am truly trying to answer any questions you have, so don’t be shy. On the other hand, I am also trying to gauge your interest in the job, so something like, “Uh, I dunno," is usually a big bummer to hear because it signals that maybe you’ve tuned out, or the job is not interesting to you. that’s can leave an undesirable aftertaste.
Look up your interviewers and find out about them. Doing this in advance can be an eye-opening exercise. You might find out about their customer acquisition strategy which could lead to a ton of other interesting questions. If the company is a startup, do they plan on being acquired, or do they want to IPO? When you have a clear, well-thought question, it makes you sound professional, which again, is one of the things I listed as important.
If you can’t think of any questions to ask, then do you really want this job in the first place? If the interviewer has a personal website, go check it out, and if nothing else, you can ask them about the comic book they wrote and posted to their website.
But I’d advise:
Ask the interview questions that you are generally interested about. Think about this before the interview because a really thoughtful question generally improves your candidacy quite a bit.
What are you, the candidate, looking for in a company? What does this person, the interviewer, need to prove to you in order for you to take this job?
Do these people have a good head on their shoulders like you do? It works both ways, you know.
Does this look like a fun job? Do you even want a fun job?
Who would you report to? Did you talk to them? Will you get a chance to during the interview process?
Are you underrepresented? Like, are you replacing someone or filling a new role? How many others will be doing what you’re doing? What signs should other underrepresented people look out for? What signs would show you that this is a good environment for you?
Don't ask about money or benefits at this point; those things can (and likely should) be covered with a recruiter introduction call before you get to a person like me.
Conclusion
Interviewing, unlike programming, is not an exact science. You’re trying to prove that you are excited about the prospect of working with a company. You want to prove this to the interviewer and yourself. Hopefully, you want a job that is interesting. This guide isn’t a script to follow, but more of a few loose ideas to help you get into the mindset of the interviewer, with a few tips for other interviewers strung in there as well. Maybe I pointed out things you might not have known before.
Just remember that, in theory, interviewing should not be a scary process, but more of a find-some-buddies-to-work-with process.
The post Interviewing for a Technical Position Doesn’t Have to Be Scary appeared first on CSS-Tricks.
Interviewing for a Technical Position Doesn’t Have to Be Scary published first on https://deskbysnafu.tumblr.com/
0 notes
Text
If you are preparing for a coding interview, you might be wondering which online platform is the best choice to practice your skills and learn new concepts.
Two of the most popular options are HackerRank and LeetCode, both of which offer a large collection of coding challenges, contests, and learning resources. But which one is better for coding interviews?
In this blog post, we will compare HackerRank and LeetCode on several criteria, such as difficulty level, variety of questions and Interview preparation material. We will also give some tips on how to use both platforms effectively to ace your coding interviews.
Difficulty Level
One of the main factors to consider when choosing an online platform for coding practice is the difficulty level of the questions. You want to challenge yourself with problems that are similar to or slightly harder than the ones you will encounter in real interviews, but not so hard that you get frustrated and demotivated.
HackerRank and LeetCode both have a wide range of difficulty levels, from easy to hard, and they also label their questions according to the companies that have asked them in the past. However, there are some differences in how they categorize their questions and how they match the expectations of different companies.
HackerRank has four difficulty levels: easy, medium, hard, and expert. The easy and medium questions are usually suitable for beginners and intermediate programmers, while the hard and expert questions are more challenging and require more advanced skills and knowledge.
LeetCode has three difficulty levels: easy, medium, and hard. The easy questions are often basic and straightforward, while the medium and hard questions are more complex and require more logic and creativity.
Interview Preparation Material
HackerRank has a section called Interview Preparation Kit, which contains curated questions that cover the most common topics and skills tested in coding interviews. These questions are grouped by domains, such as arrays, strings, trees, graphs, dynamic programming, etc., and they have a difficulty rating from 1 to 5 stars. The Interview Preparation Kit is a good way to focus on the essential topics and practice the most frequently asked questions.
LeetCode also has a section called Explore, which contains curated collections of questions that cover various topics and skills, such as arrays, linked lists, binary search, backtracking, etc. These collections also include explanations, hints, solutions, and video tutorials for each question. The Explore section is a good way to learn new concepts and techniques and apply them to different problems.
In general, LeetCode tends to have harder questions than HackerRank, especially in the medium and hard categories. This is because LeetCode focuses more on algorithmic and data structure problems, which are often more abstract and require more optimization.
Variety of Questions
HackerRank has more diverse types of problems, such as database queries, regex expressions, shell commands, etc., which are more practical and relevant for certain roles and companies. Therefore, depending on your target role and company, you might want to choose the platform that matches their expectations better.
For example, if you are applying for a software engineering role at a big tech company like Google or Facebook, you might want to practice more on LeetCode, since they tend to ask more algorithmic and data structure problems. If you are applying for a data analyst or web developer role at a smaller company or startup, you might want to practice more on HackerRank, since they tend to ask more SQL or web-related problems.
Conclusion
In conclusion, both HackerRank and LeetCode are great platforms for coding interviews, and they both have their pros and cons. It really depends on your target role and company, as well as your personal preferences and learning style.
Disclaimer: This blog post is not sponsored by either HackerRank or LeetCode. The opinions expressed here are my own and do not necessarily reflect those of either company. The logos and trademarks used in this blog post belong to their respective owners.
0 notes
Text
Interviewing for a Technical Position Doesn’t Have to Be Scary
Jacob Schatz (@jakecodes) is a staff engineer over at GitLab and was kind enough to share how he conducts job interviews for technical positions and his thinking process for them. Technical interviews are talked about often and can be a touchy subject for some, so it’s worth noting that this article expresses Jacob’s own opinions and are not necessarily shared by his employer.
Are you an interviewee who is terrified, exhausted, sad, or disappointed? I'd love to change that stigma.
I believe that people can have a great interview experience, and that I can simultaneously find the right candidate. Both things can happen at the same time! After your interview process is over, in a perfect world, regardless of outcome, you should feel good about yourself and the process. You might feel sad that you didn't get the job or excited to start your new job, but you should understand why in either situation.
At GitLab, I was put in charge of hiring very early on, and as such, I've seen thousands of resumes. When I first joined, I was asked to hire and form a team of front-end developers. I was employee #29 (we now have 500+), and I was the first front-end developer, so there was no hiring process for our team. We gradually created a process.
This article is aimed at both the interviewee, and interviewer. For the interviewee, I want you to know what a perfect interview can be like. Interviewing should not be scary or intimidating. This is a guide you can follow to do your part in creating the perfect interview. If you are an interviewer, maybe you have perfected your process. This is my view on how interviews can go in a perfect world. There are all different types of interviews, and this article focuses on interviewing developers of all experience levels. Over the years, I’ve latched on to some great processes, and this article is a behind-the-scenes look at that process for both sides of the candidacy.
Before I begin, it's important to remember that everyone is human and humans are not perfect. There are no perfect developers. Treat everyone like a regular human being. It's OK to be amazed at what some people are doing, but not OK to worship others. Talent is both congenital and acquired and you can acquire it too. Your interviewer and you are both imperfect. Interviews should not be focused around perfection. Here's what interviews should be.
Five things I look for in a candidate
The GitLab Values cover a lot of great points and you should read it. This is loosely based on those.
As an interviewer, I can only focus on so many things at once while being a productive, active listener. But I do have five specific things I am try to focus on:
Does this person have a "good head on their shoulders"?
Is this person technically where they need to be for this role?
Is this person going to be self sufficient in this role?
Does this person communicate well and will they communicate well with the team?
Does this person handle positive and negative feedback well?
There are other things I'm looking for, of course, but these five things are enough to get you the job you want if you’re interviewing with me.
Forget nervousness. I won't ever hold it against you. I know you may be nervous, and that's totally fine. There is the rare occasion that nervousness becomes a debilitating factor, and in those cases, I just ask that you reschedule. Just don't hang up on me!
Recognize there's going to be bias
We have training on bias at GitLab. One thing I learned from the training is that everyone is biased, whether or not you think you are. At one point, I had the idea of doing blind interviews like they do for some orchestras. We never implemented it (and it would be tough) but that's why I keep a list of questions and a summary of what I want to cover in each interview. Each interview has a script I can follow. Everything is as repeatable and similar as possible. As the interview progresses, I'll be able to tell if I can hit the harder questions. Harder questions are not there to disqualify people, but to qualify people. If you get to my hard questions it means you have a ton of experience and knowledge under your belt. It's really important to know that I must ask trivia questions in some form but I don't qualify candidates based on trivia questions. It's about figuring the depth of your JavaScript knowledge and programming in general.
That being said, there is still one trivia question no one has ever gotten right. I'll just keep asking it, and I am sure some day, someone will get it. Trivia questions are fun, because I am a major JavaScript dork. I just love talking about all the ins and outs of JavaScript. I am looking for people that can be my coding buddy. Hiring people is about finding other people you can work with, not people that will work for you.
Inexperienced interviewers tend to test you on what THEY know (so they can feel a little more secure when they can ding you on an "wrong" answer).
In contrast, great interviewers focus on what YOU know, and facilitating a two-way conversation to explore a mutual fit.
— Jennifer Kim (@jenistyping) April 8, 2019
I want to know you're technically sound
This may be people's worst fear. The part of the interview where we ask questions like, "Why are manholes round?" The truth is that some companies may ask the medium-to-hard questions from LeetCode, and some may never ask any technical questions.
What I'm looking for in your skillset
Experience speaks louder than any technical interview question I can ask. For example, if I'm hiring for a front-end engineering role and someone tells me they built their own cool things that we can talk about, then that's awesome. I still may need to throw some more questions their way after that, or maybe the demo answers all my questions (though unlikely, but possible). But if we can walk through the code of something that you are super proud of, that’s great.
It’s helpful if you can tell me about something that you built for another company where I can see your code, or you can explain it sufficiently enough. What were the challenges? How did you deal with 10,000 comments? How did you deal with mobile? What were some challenges? I'll give you an example: You built the comment system for GitLab. For the comment system, an interesting challenge was dealing with loading users for the @ drop-down to mentioning other users. It turns out that the JSON payload for that drop-down can get quite large and loading it on page load makes the page load significantly slower. But loading that data on the first @ keypress is also slow because the payload can be more than 10 MB. We want the user to have a seamless experience and not realize the data needs time to load. So, a good way to talk about that experience would be to describe some of the approaches you considered, like:
Load the data when the comment box first appears in the viewport.
Load the data on the user's first mouseover of the textarea.
Load the data once the user starts scrolling with enough momentum.
That last one isn't a boring solution, but is something I've heard someone say in an interview.
I might ask about algorithms and data structures
Hey interviewers, are you hiring someone for your marketing site? Don't ask them the hardest algorithms and data structure questions. Yes, algorithms and data structures play a huge part in everything, but it's more important that the candidate knows about responsive design, and maybe animations, and performance. Since we are talking about performance, they should know about Big O notation. They should know what causes re-paints. Look at Firefox Monitor and compare it to Salesforce. Everything about the Firefox site is much more snappy. Why is it more snappy? Why is the Salesforce site so chunky and slow? Resize them... oy vey! Big O would probably help you explain some parts, but being able to explain the whole picture is important.
Quick aside on Big O notation since I brought it up.
Big O is a way of describing the time your code will run in and/or the memory space your code will take up in a worst case scenario. I think it's really great to learn, and helps out in every day programming. You can and should learn it, which might take about an hour. After one hour, done or not, you’ll more than likely be prepared for any legitimate Big O question that interviewers would ask.
Big O is not something you need to take a course on. Here are some articles that can explain it to you in under an hour:
I like this Interview Cake article.
For a more formal but eventually understandable article, check out Brillant.
For a cheatsheet once you feel comfortable, check out the big o cheat sheet.
For some great examples (in a different language but very grok-able), check out this Developer Inside article.
OK, back to algorithms and data structures in interviews.
Since there's a chance these types of questions will come up, it's worth doing a little homework in advance. There are two typical gold standards when studying for interviews that ask about algorithms and data structures.
There is a book called Cracking The Coding Interview by Gayle Laakmann McDowell.
There is a website called LeetCode with lots of resources.
There are many other things that are recommended for algorithm and data structure, heavy coding interviews, but rather than memorizing every example in the world (which won't solve any problems for you), it's better to learn how to solve these problems.
As I said above, front-end engineers should learn Big O for their health, because it's good for you, like eating your Wheaties. Interviewers should not ask extensive algorithms and data structure questions unless the job requires extensive knowledge of them. If I was designing a front-end framework, say like Vue, it would be important to optimize a DOM diffing algorithm or at least understand the implementation of the algorithm you are using. But does that mean I would ask seven extra hard questions from a CTCI? No. You are testing for understanding, not for memorization. When people work through these questions (when I ask them), I want to see that they thought through the problem and we worked it out together more than I want to see that they got the right answer. It's all about figuring out what you will be able to do, as an engineer, when you get the job — not what you memorized yesterday. A person who has knowledge of algorithms is going to be better at implementing them than someone who has to learn them on the job.
Are you hiring someone to build a dependency management system? This person needs to know a lot about algorithms and data structures.
These are two extreme ends of the spectrum, but in my opinion, not everyone needs to know how to write a red-black tree from scratch — but everyone should understand Big O. However, it will dramatically improve your skills as a software developer to learn typical algorithms and data structures.
When I do ask algorithm and data structure questions here are a few I do ask:
What is a linked list and can you show me how to implement one with and without an array in JavaScript?
What is the difference between BFS and DFS and can you implement one of them?
Getting these wrong will not disqualify anyone. Remember, I don't use trivia to qualify people.
Do you have a good head on your shoulders?
There are a lot of soft skills I'm looking for as well during the interview. It's my way of determining whether you have a "good head on your shoulders."
Pedantically speaking, that means you make good decisions, but it's much more than that to me. People who have a good head on their shoulders make sound decisions. It's good to have different opinions than me, but there is a standard of knowledge we should agree on. For example, we should all agree that laying out an entire blog with only absolute positioning is a bad idea. That is not a sound decision.
But I might create a scenario like this to check on those skills:
Let's go into CodePen and create a static blog homepage. We'll need a navigation menu, and we'll need a place for the title and article, and then at the bottom let's have some comments and a footer.
I'd then talk you through different ways you could create the navigation and the pros and cons to each. For a lot of the front-end developers I hire, I'd like to know that they know some core JavaScript so I might ask them add some small functionality using only vanilla JavaScript.
When a framework does everything for you, you don't need to do things yourself. I want to know that you get the whole picture.
A “good head on you shoulders" is a fancy way of telling me that you have your crap together. This is not an exhaustive list, but are the types of things that catch my attention:
You take care of yourself
You speak professionally (this has more of an impact than most people know)
Leave out super personal details
Answer questions succinctly
Take time to think
Say, "I don't know," when you don't know
Be confident, but not cocky, even if you aren't
You finish what you start
You are honest
You are able to say no
You know what you want and you want to help others get what they want
You'll disagree and even debate, but know when to let something go
You are able to effectively communicate in an interview
Is this conversation easy or exhausting?
Are you fluent in English? Accents are totally OK!
Do you grasp the concepts being discussed?
You’re a kind person.
On that last point: kindness doesn't mean you are a pushover. Kindness is a major part of challenging others and giving feedback.
I want to see that you are self-sufficient
It seems obvious now, but I am convinced — after working at GitLab — that self-sufficiency is what interviewers should seek in everyone being hired. Self-sufficiency plays a big part in your role in the company.
For example, to go extreme, think about a GM, who may have the least amount of external direction of anyone on a team. Everyone has responsibilities, but a GM must often be good at many things, including (but not limited to) marketing, sales, and management. All this changes based on the size of the team. Their role may be the most vague. They are very self-sufficient. A senior developer (in my opinion) should be able to take on an entire large piece of functionality and implement it properly.
This is not to say a developer shouldn't communicate during the process. They should ask questions, and pair with other people to find the best way forward.
Reviewing an interviewee’s code has the opportunity to be boring (in a good way) as we know what to expect from them. We are relying on them to mentor less experienced developers. Junior developers should be self sufficient too, but probably won't take on large initiatives alone. Junior developers often work great in small chunks. For example, it might be a great thing for a junior developer to take on the smaller tasks that a senior developer has on a larger project. Senior developers can also mentor junior developers and nudge them in the right direction to help them become more self-sufficient, which is a great thing for both parties — and also a great thing for the manager, as they can delegate more work to a senior developer.
If you are a front-end developer and need hand-holding at this point in your career, that is totally 100% OK, and everyone has been there. Or, if you are applying to a lot of places and not getting anywhere, and are extremely frustrated: I suggest that you become a little more self-sufficient before you apply. One way I suggest to become more self-sufficient and nab that job you want: Forget code examples, little shopping cart apps, and their ilk, as they don't fair well for job interviews. Build something full-fledged for someone and do it for cheap or free. Find a church, synagogue, homeless shelter or someone near you and offer to make them a website.
Just remember that free clients are often the worst clients. It will be worth it when you can say that you've done work for a few clients. For bonus points, document your work in a few blog posts. This stuff looks great on resumes and will make you stick out from the rest. I know that anyone can get an easy website through Wix or other site building platforms, but there's nothing like a wonderful custom-designed website. I think I made around 10 or so websites before I had my first programming job. I could fill a book with crazy stories from those times.
Communication and feedback is key
This is another point that seems obvious, but is hard to do right. Communication is well documented in the GitLab Handbook so I won't cover it, except to say that I follow GitLab's values and we are looking for others who desire to follow those values as well. Positive and negative feedback is also well documented in the GitLab Handbooks, so I won't cover it here.
How I go about the rest of the interview
Because we interview a lot of candidates at GitLab, we follow a common flow so we can repeat it easily. I won't go into specifics about our interview process, because it's constantly evolving. But, in general, this is the flow I follow.
Tell me about yourself
You'll get asked the famous question that goes along the lines of "tell me about yourself," "tell me what you've been doing," or "tell me about your time at [Company Name]." When I ask this question, I am trying to find the connection between the job you applied for and the jobs you've had in the past. It's good to find the common ground ahead of time.
Like, for example, as an employee of GitLab, if I were personally applying to a FAANG as a front-end engineer, I am sure both GitLab and that company are trying to get page load times to be faster. Maybe I noticed there were 26K event listeners on a page when I first joined GitLab and was able to reduce it down to 0, decrease the loading time by 50%, down to a speed of 200ms. I am sure this would be something relevant to the conversation.
So, as an interviewee, I might say something like this:
"Hi! I am a front-end engineer at GitLab, I've been here for 3.5 years and during my tenure I've made a ton of huge improvements, some of the areas I loved working on are performance, UX design implementation, and architectural design.
You don't want to get into tons of details at this point, but it's good to give the interviewer some facts to work with. It is frustrating when I ask this question and someone goes into a 10-minute detailed account of their entire career.
What made you apply to our company?
The interviewer might ask, "What made you decide to apply to our company?" Hopefully, you are excited to work at this company — otherwise, why bother applying for it?
For some reason or another, this question often sends a candidate into overdrive and they wind up mixing up the name our company. That's perfectly normal behavior, especially if your company sounds like another company.
What I'm looking for at this point is to see whether you are just looking for a job or that you’re really excited to work with us. We want people who really want to work with us. This is when I can also see if a person knows anything about our company. For example, some people like our values, have read them and want to work at a company with these values. Some people want to solve big problems like the ones we are tackling. Some people have seen talks and read articles from our team and would love to work around smart people like them.
What are your five things?
Lastly, I like to ask if a candidate has any questions for me. This is an important part of the interview, and you should extensively think this through beforehand. Your goal is to make me respond with: “Oooohhh, great question!" On one hand, I am truly trying to answer any questions you have, so don’t be shy. On the other hand, I am also trying to gauge your interest in the job, so something like, “Uh, I dunno," is usually a big bummer to hear because it signals that maybe you’ve tuned out, or the job is not interesting to you. that’s can leave an undesirable aftertaste.
Look up your interviewers and find out about them. Doing this in advance can be an eye-opening exercise. You might find out about their customer acquisition strategy which could lead to a ton of other interesting questions. If the company is a startup, do they plan on being acquired, or do they want to IPO? When you have a clear, well-thought question, it makes you sound professional, which again, is one of the things I listed as important.
If you can’t think of any questions to ask, then do you really want this job in the first place? If the interviewer has a personal website, go check it out, and if nothing else, you can ask them about the comic book they wrote and posted to their website.
But I’d advise:
Ask the interview questions that you are generally interested about. Think about this before the interview because a really thoughtful question generally improves your candidacy quite a bit.
What are you, the candidate, looking for in a company? What does this person, the interviewer, need to prove to you in order for you to take this job?
Do these people have a good head on their shoulders like you do? It works both ways, you know.
Does this look like a fun job? Do you even want a fun job?
Who would you report to? Did you talk to them? Will you get a chance to during the interview process?
Are you underrepresented? Like, are you replacing someone or filling a new role? How many others will be doing what you’re doing? What signs should other underrepresented people look out for? What signs would show you that this is a good environment for you?
Don't ask about money or benefits at this point; those things can (and likely should) be covered with a recruiter introduction call before you get to a person like me.
Conclusion
Interviewing, unlike programming, is not an exact science. You’re trying to prove that you are excited about the prospect of working with a company. You want to prove this to the interviewer and yourself. Hopefully, you want a job that is interesting. This guide isn’t a script to follow, but more of a few loose ideas to help you get into the mindset of the interviewer, with a few tips for other interviewers strung in there as well. Maybe I pointed out things you might not have known before.
Just remember that, in theory, interviewing should not be a scary process, but more of a find-some-buddies-to-work-with process.
The post Interviewing for a Technical Position Doesn’t Have to Be Scary appeared first on CSS-Tricks.
😉SiliconWebX | 🌐CSS-Tricks
0 notes